home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / MPW_TOOL / TOOLS / TOOLS_WI / PERL / UNTESTED / EG / G / GCP.MAN < prev    next >
Text File  |  1991-04-28  |  2KB  |  78 lines

  1. .\" $Header: gcp.man,v 4.0 91/03/20 01:10:13 lwall Locked $
  2. .TH GCP 1C "13 May 1988"
  3. .SH NAME
  4. gcp \- global file copy
  5. .SH SYNOPSIS
  6. .B gcp
  7. file1 file2
  8. .br
  9. .B gcp
  10. [
  11. .B \-r
  12. ] file ... directory
  13. .SH DESCRIPTION
  14. .I gcp
  15. works just like rcp(1C) except that you may specify a set of hosts to copy files
  16. from or to.
  17. The host sets are defined in the file /etc/ghosts.
  18. (An individual host name can be used as a set containing one member.)
  19. You can give a command like
  20.  
  21.     gcp /etc/motd sun:
  22.  
  23. to copy your /etc/motd file to /etc/motd on all the Suns.
  24. If, on the other hand, you say
  25.  
  26.     gcp /a/foo /b/bar sun:/tmp
  27.  
  28. then your files will be copied to /tmp on all the Suns.
  29. The general rule is that if you don't specify the destination directory,
  30. files go to the same directory they are in currently.
  31. .P
  32. You may specify the union of two or more sets by using + as follows:
  33.  
  34.     gcp /a/foo /b/bar 750+mc:
  35.  
  36. which will copy /a/foo to /a/foo on all 750's and Masscomps, and then copy
  37. /b/bar to /b/bar on all 750's and Masscomps.
  38. .P
  39. Commonly used sets should be defined in /etc/ghosts.
  40. For example, you could add a line that says
  41.  
  42.     pep=manny+moe+jack
  43.  
  44. Another way to do that would be to add the word "pep" after each of the host
  45. entries:
  46.  
  47.     manny    sun3 pep
  48. .br
  49.     moe        sun3 pep
  50. .br
  51.     jack        sun3 pep
  52.  
  53. Hosts and sets of host can also be excluded:
  54.  
  55.     foo=sun-sun2
  56.  
  57. Any host so excluded will never be included, even if a subsequent set on the
  58. line includes it:
  59.  
  60.     foo=abc+def
  61. .br
  62.     bar=xyz-abc+foo
  63.  
  64. comes out to xyz+def.
  65.  
  66. You can define private host sets by creating .ghosts in your current directory
  67. with entries just like /etc/ghosts.
  68. Also, if there is a file .grem, it defines "rem" to be the remaining hosts
  69. from the last gsh or gcp that didn't succeed everywhere.
  70. .PP
  71. Interrupting with a SIGINT will cause the rcp to the current host to be skipped
  72. and execution resumed with the next host.
  73. To stop completely, send a SIGQUIT.
  74. .SH SEE ALSO
  75. rcp(1C)
  76. .SH BUGS
  77. All the bugs of rcp, since it calls rcp.
  78.